local M = {}

function M.send_to_aider(text)
    require("notify")(text)
    vim.api.nvim_chan_send(_G.aider_term.chan, text .. "\n")
end

function M.multinput_and_send()
    vim.ui.input({
        prompt = "Aider Prompt",
    },function(lines) M.send_to_aider(lines) end)
end

function M.send_current_line()
    local line = vim.api.nvim_get_current_line()
    M.send_to_aider(line)
end

function M.send_visual_selection()
    local sel = table.concat(vim.fn.getline("'<", "'>"), "\n")
    M.send_to_aider(sel)
end

return M
-- EOP
